<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
    <title>智辉CRM</title>
    <meta name="keywords" content="智辉CRM">
    <meta name="description" content="智辉CRM">
    <link rel="Bookmark" href="favicon.ico">
    <link rel="Shortcut Icon" href="favicon.ico" />
    <!--[if lt IE 9]> 
    <script type="text/javascript" src="Lib/html5.js"></script>
    <script type="text/javascript" src="Lib/respond.min.js"></script>
    <script type="text/javascript" src="Lib/PIE_IE678.js"></script>
    <![endif]-->
    <link href="__PUBLIC__/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/css/style.css" rel="stylesheet" type="text/css" />
    <!--自己的样式-->
    <link href="Tpl/Assistant/common/expense/expense_edit.css" rel="stylesheet" type="text/css">
    <!--[if IE 6]> 
    <script type="text/javascript" src="Lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('.pngfix,.icon');</script> 
    <![endif]-->
    <link href="__PUBLIC__/Validform/5.3.2/style.css" rel="stylesheet" type="text/css" />
    
    
    
</head>

<body>
    <div class="cont_right">
            <div class="row margin_t">
                <div class="col-12"><span style="color:#006699;font-size:16px">物业费编辑</span></div>
            </div>
            <div class="row">
                <div class="col-12"><span>房屋名称：{$roomData['full_parent_name']}{$roomData['name']}</span></div>
            </div>
            <form method="post" id="demoform" action="" class="form_name demoform padd">
                <input type="hidden" value="{$roomData['id']}" name='room_id'/>
                <input type="hidden" value="{:time()}" name='update_time'/>
                <input type="hidden" value="{$data['id']}" name='id'/>
<!--                <input type="hidden" value="{$roomData['community_id']}" name='community_id'/>
                <input type="hidden" value="{$roomData['zone_id']}" name='zone_id'/>
                <input type="hidden" value="{$roomData['building_id']}" name='building_id'/>
                <input type="hidden" value="{$roomData['unit_id']}" name='unit_id'/>-->
                <div class="row">
                    费用类型：<select name="type" id="" datatype="*1-10" errormsg="请填写正确的类型！">
                                <option value="">选择费用类型</option>
                                <volist name='type' id='v'>
                                <option value="{$v.value}" {$v['value']==$data['type']?"selected='selected'":''}>{$v.text}</option>
                                </volist>
                            </select>
                </div>
                <div class="row pad4">
                    费用金额：<input type="text" name='money' class="input-text size-MINI width_input" value="{$data.money}" datatype="*1-10" errormsg="请填写正确的金额！"/>
                </div>
                <div class="row pad4">
                    责任户主：<input type="text" name='payer_name' class="input-text size-MINI width_input" value="{$data.payer_name}" datatype="*1-10" errormsg="请填写正确的户主名！"/>
                </div>
                <div class="row pad4">
                    手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机：<input  type="text" name='payer_phone' value="{$data.payer_phone}" class="input-text size-MINI width_input" />
                </div>
                <div class="row pad4">
                    费用年度：<select name="year" id="" datatype="*1-10" errormsg="请填写正确的年度！">
                                <option value="">选择费用年度</option>
                                <volist name='year' id='v'>
                                <option value="{$v.value}" {$v['value']==$data['year']?"selected='selected'":''}>{$v.text}</option>
                                </volist>
                            </select>
                </div>
                <div class="row pad4">
                    开始时间：<input type="text"  name="start_time" value="{$data['start_time']|date="Y-m-d",###}" datatype="*1-100" errormsg="时间必须填写！"/>
                </div>
                <div class="row pad4">
                    结束时间：<input type="text"  name="end_time" value="{$data['end_time']|date="Y-m-d",###}" datatype="*1-100" errormsg="时间必须填写！"/>
                </div>
                <div class="row pad4">
                    截止时间：<input type="text" id='close_time'  name="close_time" value="{$data['close_time']|date="Y-m-d",###}" datatype="*1-100" errormsg="时间必须填写！"/>
                </div>
                <div class="row pad4">
                    缴费状态：<select name="status" id="" datatype="*1-10" errormsg="请选择状态！">
                                <option value="">选择缴费状态</option>
                                <option value="0" {$data['status']==0?"selected='selected'":''}>未缴费</option>
                                <option value="1" {$data['status']==1?"selected='selected'":''}>已缴费</option>
                            </select>
                </div>
           
<!--            <div class="xian"></div>-->
            <div class="row">
                <div class="col-12 posi">
                    <input class="btn btn-secondary-outline radius" type="submit" value="确定">
                </div>
            </div>
         </form>
        </div>
    
    
    
    
    
    
    
    <script type="text/javascript" src="__PUBLIC__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/H-ui.js"></script>
    
    <script src="__PUBLIC__/lib/layer/2.1/layer.js"></script>
    <script src="Tpl/Assistant/common/expense/layerui.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Validform/5.3.2/Validform.min.js"></script>
    <script src="http://cdn.bootcss.com/jquery.form/3.51/jquery.form.min.js"></script>
    <!--时间插件-->
    <script type="text/javascript" src="__PUBLIC__/datepicker/jquery-ui-1.9.2.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/datepicker/jquery-ui-1.9.2.custom.min.css" />    
<script>
    $( "input[name='start_time']" ).datepicker({dateFormat: "yy-mm-dd"});
    $( "input[name='end_time']" ).datepicker({dateFormat: "yy-mm-dd"});
    $( "input[name='close_time']" ).datepicker({dateFormat: "yy-mm-dd"});

$(function(){
            $(".demoform").Validform({
            tiptype:2,
            ajaxPost:true,
            showAllError:true,
            beforeSubmit:function(curform){
            
                curform.ajaxSubmit({
                type:'POST',
                url:'{:U('Assistant/Expense/edit')}',
                success:function(data){
                  console.log(status);
                  if(data.status==true){
                      layer.msg("修改成功");
                      var index = parent.layer.getFrameIndex(window.name);
                      setTimeout(function(){
                           parent.layer.close(index);
                      },1000);
                      parent.location.reload();

                  }else{
                    layer.msg(data.sign);
                  }
                  }
                });
             return false; 
            }
          });
        });
</script>
</body>

</html>

